import request from "../utils/request";
type API<T=any> = (...args:T[])=>Promise<any>

//所有靶场信息
export const allRangeApi = ()=>{
    return request('/target/findAll')
}

//添加靶场
export const addRangApi:API<{diffculty:string, flag: string,
image: string,lable:string,note: string,
tname: string,
type: string}>=(body)=>{
    return request("/target/add",{
        method:"post",
        body
    })
}
//删除靶场
export const delRangApi:API<{tid:string}> = (tid)=>{
    return request(`/target/del?tid=`+tid,{
        method:"delete",
    })
}
